package com.example.movies.Utils;

import android.graphics.Color;
import android.os.Build;
import android.view.View;
import android.view.Window;

public class BaseUtils {
    public static void Setimmersion(Window win)
    {
        //设置沉浸模式
        if (Build.VERSION.SDK_INT >= 21) {
            View decorView = win.getDecorView();
            int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
            decorView.setSystemUiVisibility(option);
            win.setStatusBarColor(Color.TRANSPARENT);
//            View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
            //设置底部栏透明
//            win.setNavigationBarColor(Color.TRANSPARENT);
        }
    }
}
